﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SongSharp.Domain.Suggesting
{
    public class Weight
    {
        public const double MAX = 9.0;
        public const double MIN = 0.0;

        public double Value { get; private set; }

        public Weight(double weight)
        {
            if (weight < MIN || weight > MAX)
                throw new ArgumentException("The weight value must be between " + MIN + " and " + MAX + ".");
            else
                Value = weight;
        }

        public static double operator -(int i, Weight w)
        {
            return i - w.Value;
        }

    }
}
